//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//

package mutsumimod.actions;

import com.megacrit.cardcrawl.actions.AbstractGameAction;
import com.megacrit.cardcrawl.actions.animations.VFXAction;
import com.megacrit.cardcrawl.actions.common.ExhaustAction;
import com.megacrit.cardcrawl.actions.common.ExhaustSpecificCardAction;
import com.megacrit.cardcrawl.cards.AbstractCard;
import com.megacrit.cardcrawl.core.AbstractCreature;
import com.megacrit.cardcrawl.core.CardCrawlGame;
import com.megacrit.cardcrawl.dungeons.AbstractDungeon;
import com.megacrit.cardcrawl.powers.AbstractPower;
import mutsumimod.vfx.ExhaustCardDiscardPileEffect;

public class BetterExhaustSpecificCardAction extends BaseAction {

    private AbstractCard card;
    public BetterExhaustSpecificCardAction(AbstractCard card) {
        this.card = card;
    }

    public void update() {
        if(AbstractDungeon.player.hand.contains(card)) {
            addToTop(new ExhaustSpecificCardAction(card, AbstractDungeon.player.hand));
        }else if(AbstractDungeon.player.drawPile.contains(card)) {
            addToTop(new ExhaustSpecificCardAction(card, AbstractDungeon.player.drawPile));
        }else if(AbstractDungeon.player.discardPile.contains(card)) {
            addToTop(new ExhaustSpecificCardAction(card, AbstractDungeon.player.discardPile));
            addToTop(new VFXAction(new ExhaustCardDiscardPileEffect(card)));
        }
        isDone = true;
    }
}
